Registration of a ship in a country chosen for its low taxes, permissive regulations, and so on.
The flag flown by a ship so registered (which flag then corresponds to the country of registration).